package com.codinghero.zqlb.weibo.sina.driver;

import org.apache.log4j.Logger;

import weibo4j.Timeline;
import weibo4j.Weibo;
import weibo4j.model.WeiboException;

public class SaeOAuthWeiboDriver {
	
	private static Logger log = Logger.getLogger(SaeOAuthWeiboDriver.class);
	
	public void post(String accessToken, String weiboDes) {
		Weibo weibo = new Weibo();
		weibo.setToken(accessToken);
		Timeline tm = new Timeline();
		try {
			log.info("ready to update status " + weiboDes);
			tm.UpdateStatus(weiboDes);
			log.info("update status " + weiboDes);
		} catch (WeiboException e) {
			e.printStackTrace();
			log.info("update status error");
		}
	}
}
